CFLAGS0  = -I$(HOME)/csr-repository/ImageProcLib/
LDFLAGS0 = -Wall -lfind_robots  -lraspicamcv -lwiringPi -lcolor_thresholding
LDFLAGS1 = $(LDFLAGS0) -lopencv_highgui -lopencv_core -lopencv_legacy -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_imgproc
LDFLAGS = $(LDFLAGS1) -L/opt/vc/userland/build/lib -lmmal_core -lmmal -l mmal_util -lvcos -lbcm_host



#BUILD_TYPE=debug
BUILD_TYPE=release

CFLAGS_COMMON = -Wno-multichar -g $(CFLAGS0) -MD


ifeq ($(BUILD_TYPE), debug)
	CFLAGS = $(CFLAGS_COMMON)
endif
ifeq ($(BUILD_TYPE), release)
	CFLAGS = $(CFLAGS_COMMON) -O3
endif
all: findRobots.o findRobots	
findRobots.o: *.cpp
	gcc -c *.cpp $(CFLAGS)
	gcc $(LDFLAGS) -lstdc++ -o findRobots *.o
	
	
